
#region Imports

using System;
using System.Runtime.Serialization;

#endregion

namespace Justa.Data
{
    /// <summary>
    /// DataAccessException should be thrown from any data access object (DAO)
    /// in order to hide the underlying data access technology.
    /// </summary>
    /// 
    /// <author>Abel Perez (java.aperez@gmail.com)</author>
    /// 
    public class DataAccessException : System.ApplicationException
    {
        /// <summary>
        /// Simple constructor.
        /// </summary>
        /// 
        public DataAccessException()
            : base()
        {
        }

        /// <summary>
        /// Constructs this exception with the specified error message.
        /// </summary>
        /// 
        /// <param name="message">the error message that describes this exception.</param>
        /// 
        public DataAccessException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Constructs this exception with the specified error message and
        /// root exception that caused the error this exception encapsulates.
        /// </summary>
        /// 
        /// <param name="message">the error message that describes this exception.</param>
        /// <param name="exception">the root exception this exception encapsulates.</param>
        /// 
        public DataAccessException(string message, Exception exception)
            : base(message, exception)
        {
        }

        /// <summary>
        /// Constructs this exception with the specified serialization info and 
        /// streaming context.
        /// </summary>
        /// 
        /// <param name="serializationInfo"></param>
        /// <param name="streamingContext"></param>
        /// 
        public DataAccessException(SerializationInfo serializationInfo, StreamingContext streamingContext)
            : base(serializationInfo, streamingContext)
        {
        }
    }
}